.class public Lcom/uucun/adsdk/c/b;
.super Lcom/uucun/adsdk/c/j;


# instance fields
.field public a:Ljava/lang/String;

.field private d:Ljava/lang/String;

.field private e:Ljava/lang/String;

.field private f:Landroid/content/Context;

.field private g:Ljava/lang/String;

.field private h:Landroid/app/Notification;

.field private i:Landroid/app/PendingIntent;

.field private j:Landroid/app/NotificationManager;

.field private k:I

.field private l:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .locals 2

    const/4 v1, 0x0

    invoke-direct {p0, p1}, Lcom/uucun/adsdk/c/j;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/uucun/adsdk/c/b;->d:Ljava/lang/String;

    const-class v0, Lcom/uucun/adsdk/c/b;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/uucun/adsdk/c/b;->e:Ljava/lang/String;

    iput-object v1, p0, Lcom/uucun/adsdk/c/b;->g:Ljava/lang/String;

    const-string v0, ""

    iput-object v0, p0, Lcom/uucun/adsdk/c/b;->a:Ljava/lang/String;

    iput-object v1, p0, Lcom/uucun/adsdk/c/b;->i:Landroid/app/PendingIntent;

    const-string v0, "0"

    iput-object v0, p0, Lcom/uucun/adsdk/c/b;->l:Ljava/lang/String;

    iput-object p2, p0, Lcom/uucun/adsdk/c/b;->b:Ljava/lang/String;

    iput-object p1, p0, Lcom/uucun/adsdk/c/b;->f:Landroid/content/Context;

    iput-object p3, p0, Lcom/uucun/adsdk/c/b;->a:Ljava/lang/String;

    invoke-static {}, Lcom/uucun/adsdk/b/c;->a()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/uucun/adsdk/c/b;->d:Ljava/lang/String;

    const-string v0, "notification"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/NotificationManager;

    iput-object v0, p0, Lcom/uucun/adsdk/c/b;->j:Landroid/app/NotificationManager;

    invoke-direct {p0}, Lcom/uucun/adsdk/c/b;->a()V

    return-void
.end method

.method private a()V
    .locals 5

    invoke-static {}, Ljava/lang/Math;->random()D

    move-result-wide v0

    const-wide v2, 0x40c3880000000000L

    mul-double/2addr v0, v2

    double-to-int v0, v0

    iput v0, p0, Lcom/uucun/adsdk/c/b;->k:I

    new-instance v0, Landroid/app/Notification;

    invoke-direct {v0}, Landroid/app/Notification;-><init>()V

    iput-object v0, p0, Lcom/uucun/adsdk/c/b;->h:Landroid/app/Notification;

    iget-object v0, p0, Lcom/uucun/adsdk/c/b;->h:Landroid/app/Notification;

    const v1, 0x1080081

    iput v1, v0, Landroid/app/Notification;->icon:I

    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    iget-object v1, p0, Lcom/uucun/adsdk/c/b;->f:Landroid/content/Context;

    const/4 v2, 0x0

    const/high16 v3, 0x400

    invoke-static {v1, v2, v0, v3}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v0

    iput-object v0, p0, Lcom/uucun/adsdk/c/b;->i:Landroid/app/PendingIntent;

    iget-object v0, p0, Lcom/uucun/adsdk/c/b;->h:Landroid/app/Notification;

    iget-object v1, p0, Lcom/uucun/adsdk/c/b;->f:Landroid/content/Context;

    const-string v2, "\u8fde\u63a5\u670d\u52a1\u5668..."

    const-string v3, "\u8fde\u63a5\u4e2d..."

    iget-object v4, p0, Lcom/uucun/adsdk/c/b;->i:Landroid/app/PendingIntent;

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/app/Notification;->setLatestEventInfo(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V

    iget-object v0, p0, Lcom/uucun/adsdk/c/b;->j:Landroid/app/NotificationManager;

    iget v1, p0, Lcom/uucun/adsdk/c/b;->k:I

    iget-object v2, p0, Lcom/uucun/adsdk/c/b;->h:Landroid/app/Notification;

    invoke-virtual {v0, v1, v2}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V

    return-void
.end method


# virtual methods
.method public a(Ljava/lang/String;)Lcom/uucun/adsdk/d/f;
    .locals 1

    invoke-static {p1}, Lcom/uucun/adsdk/b/i;->e(Ljava/lang/String;)Lcom/uucun/adsdk/d/f;

    move-result-object v0

    return-object v0
.end method

.method protected varargs a([Lorg/json/JSONObject;)Lcom/uucun/adsdk/d/f;
    .locals 6

    const/4 v5, 0x0

    const/4 v0, 0x0

    :try_start_0
    aget-object v0, p1, v0

    iget-object v1, p0, Lcom/uucun/adsdk/c/b;->f:Landroid/content/Context;

    invoke-static {v0, v1}, Lcom/uucun/adsdk/b/c;->a(Lorg/json/JSONObject;Landroid/content/Context;)V

    const/4 v0, 0x0

    aget-object v0, p1, v0

    const-string v1, "app_key"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x0

    aget-object v1, p1, v1

    const-string v2, "imei"

    invoke-virtual {v1, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_0

    if-eqz v1, :cond_0

    invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_1

    :cond_0
    move-object v0, v5

    :goto_0
    return-object v0

    :cond_1
    const/4 v0, 0x0

    aget-object v0, p1, v0

    const-string v1, "flag"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/uucun/adsdk/c/b;->g:Ljava/lang/String;

    const/4 v0, 0x0

    aget-object v0, p1, v0

    const-string v1, "process_num"

    iget-object v2, p0, Lcom/uucun/adsdk/c/b;->d:Ljava/lang/String;

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const/4 v0, 0x0

    aget-object v0, p1, v0

    const-string v1, "app_key"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuffer;

    invoke-direct {v1}, Ljava/lang/StringBuffer;-><init>()V

    const/4 v2, 0x0

    aget-object v2, p1, v2

    const-string v3, "imei"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    const-string v2, "|"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    iget-object v2, p0, Lcom/uucun/adsdk/c/b;->e:Ljava/lang/String;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "AD ID\uff1a "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, p0, Lcom/uucun/adsdk/c/b;->a:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/uucun/adsdk/b/h;->c(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v2, p0, Lcom/uucun/adsdk/c/b;->a:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    const-string v2, "|"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-static {}, Lcom/uucun/adsdk/b/c;->a()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    const-string v2, "|"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    const/4 v2, 0x0

    aget-object v2, p1, v2

    const-string v3, "isInstall"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_2

    const/4 v2, 0x0

    aget-object v2, p1, v2

    const-string v3, "isInstall"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lcom/uucun/adsdk/c/b;->l:Ljava/lang/String;

    iget-object v2, p0, Lcom/uucun/adsdk/c/b;->l:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    :goto_1
    invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/DoEncrypt;->encodecrypt(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x0

    aget-object v1, p1, v1

    const-string v2, "valid_key"

    invoke-virtual {v1, v2, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const/4 v0, 0x0

    aget-object v0, p1, v0

    const-string v1, "ad_id"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->remove(Ljava/lang/String;)Ljava/lang/Object;

    const/4 v0, 0x0

    aget-object v0, p1, v0

    const-string v1, "isInstall"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->remove(Ljava/lang/String;)Ljava/lang/Object;

    const/4 v0, 0x0

    aget-object v0, p1, v0

    invoke-virtual {p0, v0}, Lcom/uucun/adsdk/c/b;->a(Lorg/json/JSONObject;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/uucun/adsdk/d/f;

    move-object v0, p0

    goto/16 :goto_0

    :cond_2
    const-string v2, "0"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    move-object v0, v5

    goto/16 :goto_0
.end method

.method protected a(Lcom/uucun/adsdk/d/f;)V
    .locals 9

    invoke-static {}, Lcom/uucun/adsdk/a/c;->a()Lcom/uucun/adsdk/a/c;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/uucun/adsdk/a/c;->b(Lcom/uucun/adsdk/c/b;)V

    iget-object v0, p0, Lcom/uucun/adsdk/c/b;->j:Landroid/app/NotificationManager;

    iget v1, p0, Lcom/uucun/adsdk/c/b;->k:I

    invoke-virtual {v0, v1}, Landroid/app/NotificationManager;->cancel(I)V

    if-nez p1, :cond_0

    const-string v0, "\u4e0b\u8f7d\u51fa\u9519,\u8bf7\u91cd\u8bd5."

    iget-object v1, p0, Lcom/uucun/adsdk/c/b;->f:Landroid/content/Context;

    invoke-static {v0, v1}, Lcom/uucun/adsdk/UUAppConnect;->showToast(Ljava/lang/String;Landroid/content/Context;)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/uucun/adsdk/c/b;->e:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "PackageName:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p1, Lcom/uucun/adsdk/d/f;->a:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/uucun/adsdk/b/h;->b(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/uucun/adsdk/c/b;->e:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Apk Url:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p1, Lcom/uucun/adsdk/d/f;->b:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/uucun/adsdk/b/h;->b(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/uucun/adsdk/c/b;->e:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Point:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p1, Lcom/uucun/adsdk/d/f;->d:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/uucun/adsdk/b/h;->b(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/uucun/adsdk/c/b;->e:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Version:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p1, Lcom/uucun/adsdk/d/f;->e:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/uucun/adsdk/b/h;->b(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/uucun/adsdk/c/b;->f:Landroid/content/Context;

    iget-object v1, p1, Lcom/uucun/adsdk/d/f;->a:Ljava/lang/String;

    iget v2, p1, Lcom/uucun/adsdk/d/f;->e:I

    invoke-static {v0, v1, v2}, Lcom/uucun/adsdk/b/c;->a(Landroid/content/Context;Ljava/lang/String;I)Z

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/uucun/adsdk/c/b;->f:Landroid/content/Context;

    iget-object v1, p1, Lcom/uucun/adsdk/d/f;->a:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/uucun/adsdk/b/c;->b(Landroid/content/Context;Ljava/lang/String;)Z

    goto/16 :goto_0

    :cond_1
    invoke-static {}, Lcom/uucun/adsdk/a/b;->a()Lcom/uucun/adsdk/a/b;

    move-result-object v8

    new-instance v0, Lcom/uucun/adsdk/c/l;

    iget-object v1, p0, Lcom/uucun/adsdk/c/b;->f:Landroid/content/Context;

    const/4 v2, 0x0

    iget-object v4, p0, Lcom/uucun/adsdk/c/b;->a:Ljava/lang/String;

    iget-object v5, p0, Lcom/uucun/adsdk/c/b;->d:Ljava/lang/String;

    iget-object v6, p0, Lcom/uucun/adsdk/c/b;->g:Ljava/lang/String;

    iget-object v7, p0, Lcom/uucun/adsdk/c/b;->l:Ljava/lang/String;

    move-object v3, p1

    invoke-direct/range {v0 .. v7}, Lcom/uucun/adsdk/c/l;-><init>(Landroid/content/Context;Landroid/os/Handler;Lcom/uucun/adsdk/d/f;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v8, v0}, Lcom/uucun/adsdk/a/b;->a(Lcom/uucun/adsdk/c/l;)V

    goto/16 :goto_0
.end method

.method public bridge synthetic b(Ljava/lang/String;)Ljava/lang/Object;
    .locals 1

    invoke-virtual {p0, p1}, Lcom/uucun/adsdk/c/b;->a(Ljava/lang/String;)Lcom/uucun/adsdk/d/f;

    move-result-object v0

    return-object v0
.end method

.method protected bridge synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1

    check-cast p1, [Lorg/json/JSONObject;

    invoke-virtual {p0, p1}, Lcom/uucun/adsdk/c/b;->a([Lorg/json/JSONObject;)Lcom/uucun/adsdk/d/f;

    move-result-object v0

    return-object v0
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0

    check-cast p1, Lcom/uucun/adsdk/d/f;

    invoke-virtual {p0, p1}, Lcom/uucun/adsdk/c/b;->a(Lcom/uucun/adsdk/d/f;)V

    return-void
.end method

.method protected onPreExecute()V
    .locals 2

    invoke-super {p0}, Lcom/uucun/adsdk/c/j;->onPreExecute()V

    const-string v0, "\u5f00\u59cb\u4e0b\u8f7d..."

    iget-object v1, p0, Lcom/uucun/adsdk/c/b;->f:Landroid/content/Context;

    invoke-static {v0, v1}, Lcom/uucun/adsdk/UUAppConnect;->showToast(Ljava/lang/String;Landroid/content/Context;)V

    return-void
.end method
